package org.squabble.web.account;

import java.io.Serializable;

import org.springmodules.validation.bean.conf.loader.annotation.handler.Expression;
import org.springmodules.validation.bean.conf.loader.annotation.handler.Length;
import org.springmodules.validation.bean.conf.loader.annotation.handler.NotBlank;
import org.springmodules.validation.bean.conf.loader.annotation.handler.ValidatorRef;
import org.squabble.web.AbstractPasswordRequiredCommand;

@ValidatorRef("passwordRequiredValidator")
public class PasswordChangeCommand extends AbstractPasswordRequiredCommand
		implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4732493330314765753L;

	@Length(min = 6, max = 25)
	private String newPassword;

	@NotBlank
	@Expression("newPassword equals newPasswordVerify")
	private String newPasswordVerify;

	public String getNewPassword() {
		return newPassword;
	}

	public void setNewPassword(String newPassword) {
		this.newPassword = newPassword;
	}

	public String getNewPasswordVerify() {
		return newPasswordVerify;
	}

	public void setNewPasswordVerify(String newPasswordVerify) {
		this.newPasswordVerify = newPasswordVerify;
	}

}
